


# JAVAPATH := /usr/lib/jvm/java-7-openjdk-amd64/bin/
JAVAPATH := 
JAVAC := $(JAVAPATH)javac
JAVA  := $(JAVAPATH)java
JAR   := $(JAVAPATH)jar

JFLAGS := -Djava.ext.dirs=.:./lib

TARGET := authsdk.jar
TEST   := MainTest.class

SOURCES := 
SOURCES += com/huawei/authapk/SDKMgr.java
SOURCES += com/huawei/authapk/SLog.java
SOURCES += com/zte/iptvclient/android/androidsdk/SDKLoginMgr.java


CLASSES := $(SOURCES:.java=.class)


all: $(TARGET) $(TEST)

$(TARGET): $(CLASSES)
	$(JAR) cvf $@ `find com -name '*.class'`

$(TEST): $(TARGET) MainTest.java
	$(JAVAC) MainTest.java -classpath $(TARGET) $(JFLAGS)

%.class:%.java
	$(JAVAC) $< $(JFLAGS)

run:
	$(JAVA) $(JFLAGS) MainTest

clean:
	rm -frv $(CLASSES) $(TARGET) *.class
	find . -name '*.class' -exec rm -f {} \;

